﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.libra.loader
{
    import flash.events.*;
    
    import net.libra.loader.mission.Mission;

    public class LoaderEvent extends Event {

		public static const ON_PROGRESS:String = "on_progress";
		public static const ON_COMPLETE:String = "onComplete";
		public static const ON_FAILURE : String = "onFailure";
		
        public static const MISSION_PROGRESS:String = "missionProgress";
        public static const MISSION_COMPLETE:String = "missionComplete";
        public static const MISSION_START:String = "missionStart";
        public static const SHOW_CACHE_PANEL:String = "showCachePanel";
        public static const MISSION_ERROR:String = "missionError";
        public static const LAZY_MISSION_EMPTY:String = "lazyMissionEmpty";
        public static const MISSION_REMOVE:String = "missionRemove";
        public static const HIDE_CACHE_PANEL:String = "hideCachePanel";
        public static const MISSION_EMPTY:String = "missionEmpty";
        public static const MISSION_ABORT:String = "missionAbort";
        public static const DISABLED_CACHE:String = "disabledCache";

        public var bytesLoaded:int;
        public var bytesTotal:int;
        public var mission:Mission;
		public var data:Object;

        public function LoaderEvent(type:String,obj:Object=null,bytesLoaded:int=0, bytesTotal:int=0, mission:Mission=null){
            super(type);
			this.data = obj;
            this.bytesTotal = bytesTotal;
            this.bytesLoaded = bytesLoaded;
            this.mission = mission;
        }
        override public function clone():Event{
            return (new LoaderEvent(type,data, bytesLoaded, bytesTotal, mission));
        }

    }
}
